package com.cosmoplat.xikai.business.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.util.Date;

@Data
@ApiModel(value = "未上传mes的接口", description = "用于记录为上传mes的接口信息")
public class BaseMesNotUpload {

    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    @ApiModelProperty(value = "主键", required = false, example = "1")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
     * 派工任务id
     */
    @ApiModelProperty(value = "派工任务ID", required = true, example = "MAT001")
    @NotBlank(message = "派工任务id不能为空")
    private Long baseDispatchTaskId;
    /**
     * 派工任务需要上报的状态
     * 1:开工
     *
     */
    @ApiModelProperty(value = "派工任务未上报状态", required = true, example = "1")
    @NotBlank(message = "派工任务id不能为空")
    private String baseDispatchTaskStatus;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", hidden = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间", hidden = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    public BaseMesNotUpload(Long baseDispatchTaskId, String baseDispatchTaskStatus, Date createTime) {
        this.baseDispatchTaskId = baseDispatchTaskId;
        this.baseDispatchTaskStatus = baseDispatchTaskStatus;
        this.createTime = createTime;
    }
    public BaseMesNotUpload() {}
}
